package com.ycb;

import com.ycb.mapper.OrderMapper;
import com.ycb.utils.DBUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.session.SqlSession;


@Slf4j
public class App {

	public static void main(String[] args) throws Exception {
		int amt = 10;
		SqlSession session = DBUtil.getSqlSession();
		OrderMapper orMapper = session.getMapper(OrderMapper.class);
		int addAmt = orMapper.addAmt(1001, amt);
		int subAmt = orMapper.subAmt(1001, amt);
		session.commit();
		session.close();
		log.info("ok addAmt = {} subAmt = {}",addAmt,subAmt);
	}


	
}
